# Maintainer: Conrad Hoffmann <ch@bitfehler.net>
pkgname=dracut
pkgver=056
pkgrel=0
pkgdesc="An event driven initramfs infrastructure"
url="https://dracut.wiki.kernel.org/index.php/Main_Page"
arch="all !riscv64" # textrel
license="GPL-2.0-or-later"
depends="bash eudev coreutils findmnt"
makedepends="fts-dev kmod-dev pkgconfig"
subpackages="$pkgname-dev $pkgname-doc $pkgname-bash-completion"
options="!check" # There is a test suite, but it requires root/sudo
triggers="$pkgname.trigger=/usr/share/kernel/*"
source="https://mirrors.edge.kernel.org/pub/linux/utils/boot/dracut/dracut-$pkgver.tar.xz"
provides="initramfs-generator"
provider_priority=100 # low, somewhat experimental

build() {
	./configure --sysconfdir="/etc"
	CFLAGS="$CFLAGS -D__GLIBC_PREREQ=" CWD="$(pwd)" make
}

package() {
	DESTDIR="$pkgdir" make install
}

sha512sums="
19268763e128984d20cab766bbdf2de12fe534ce2562fc688203099ef9b4cf83d0ccd2129499c70cdc6dd4ad53f0ffc2f3378eff5b8a15fda27c23b20f903df2  dracut-056.tar.xz
"
